package com.whfc.quality.service;

import com.whfc.common.exception.BizException;
import com.whfc.common.result.PageData;
import com.whfc.quality.dto.QualityFineDTO;
import com.whfc.quality.dto.QualityFineNumDTO;
import com.whfc.quality.param.QualityFineAddParam;
import com.whfc.quality.param.QualityFineCompleteParam;

import java.util.Date;
import java.util.List;

/**
 * @author hw
 * @description 质量罚款单
 * @date 2021/8/13
 */
public interface QualityFineService {

    /**
     * 添加质量罚单
     *
     * @param param
     * @throws BizException
     */
    void add(QualityFineAddParam param) throws BizException;

    /**
     * 质量罚款统计
     *
     * @param deptId
     * @param corpName
     * @param userName
     * @param startTime
     * @param endTime
     * @return
     * @throws BizException
     */
    QualityFineNumDTO num(Integer deptId, String corpName, String userName,
                          Date startTime, Date endTime) throws BizException;

    /**
     * 质量罚单列表
     *
     * @param deptId
     * @param corpName
     * @param userName
     * @param state
     * @param startTime
     * @param endTime
     * @param pageSize
     * @param pageNum
     * @return
     * @throws BizException
     */
    PageData<QualityFineDTO> list(Integer deptId, String corpName, String userName, String state,
                                  Date startTime, Date endTime, Integer pageSize, Integer pageNum) throws BizException;


    /**
     * 删除质量罚单
     *
     * @param fineId
     * @throws BizException
     */
    void del(Integer fineId) throws BizException;

    /**
     * 审批/批准罚款单
     *
     * @param param
     * @throws BizException
     */
    void complete(QualityFineCompleteParam param) throws BizException;

    /**
     * 罚款单导出
     * @param fineIds
     * @param deptId
     * @throws BizException
     */
    void fineExport(List<Integer> fineIds, Integer deptId) throws BizException;

    void deleteBatch(List<Integer> idList);
}
